<template>
  <el-button
    type="primary"
    icon="el-icon-search"
    size="mini"
    @click="click"
    v-hasPermi="perm"
    v-hasRole="role"
    v-hasRoleType="roleType"
  >
    {{ text }}
  </el-button>
</template>

<script>
export default {
  name: 'SearchButton',
  props: {
    text: {
      type: String,
      required: false,
      default: () => "搜索",
    },
    perm: {
      type: Array,
      required: false,
      default: () => [],
    },
    role: {
      type: Array,
      required: false,
      default: () => [],
    },
    roleType: {
      type: Array,
      required: false,
      default: () => [],
    }
  },
  methods: {
    click() {
      this.$emit('click')
    }
  }
}
</script>
